<?php if (!defined('THINK_PATH')) exit();?>	<div style='text-align:center;padding:1px;color:#89a;border:0px solid;line-height:50px;font-size:25px;font-weight:bold'>
		通化房屋租售信息
	</div>
		

	<!--主内容区-->
	<div style='border:0px solid;margin-bottom:50px' id='content'>


		<!--条件选择区-->
		<div id='Index_Condition'></div>

		<!--信息列表-->
		<div id='index_fpage'></div>

	</div>

	
	<!--底部导航-->
	<div style='position:fixed;bottom:0;width:100%;height:45px;background:#fce'>
		<div id='nav_bottom' style='border:0px solid;height:100%;display:flex;text-align:center;line-height:45px'>
			<div style='flex:1;border:0px solid' id='index'>首页</div>
			<div style='flex:1;border:0px solid' id='issue'>发布信息</div>
			<div style='flex:1;border:0px solid' id='me'>我的</div>
		</div>
	</div>
	<script>
					
		$(function(){

			//条件筛选
			if(sessionStorage.Index_Condition){
//				$('#Index_Condition').html(unescape(sessionStorage.Index_Condition));
			}else{
			}
				$.ajax({
					url:'/index.php/Fang/Before/index_condition',
					success:function(res){
						$('#Index_Condition').html(res);
						sessionStorage.Index_Condition = escape(res);
					}
				});



			//保存当前模块名，用于用户登陆返回跳转时使用
			sessionStorage.ModuleName = '<?php echo MODULE_NAME;?>';



			//筛选排序条件，做为get数据以备发送
			var arr = new Array();
			for(var i=0;i<sessionStorage.length;i++){
				p = /condition_/gi;
				if(p.test(sessionStorage.key(i))){
					arr.push(sessionStorage.key(i));
				}
			}
			arr.sort();
			var obj = new Object();
			for(var i=0;i<arr.length;i++){
				var ostr = 'obj.'+arr[i]+'=sessionStorage.'+arr[i];
				eval(ostr);
			}
		//	alert(JSON.stringify(obj));

			//获取信息列表
			get_info_list(obj);

			function get_info_list(obj){
				var uri = md5(JSON.stringify(obj));
				var str_get = 'sessionStorage.Page_Index'+uri;
				var str_get_stat = 'sessionStorage.expire_stat'+uri;

				//alert(parseInt(eval(str_get_stat)) +'--'+ sessionStorage.expire_stat);
				if(eval(str_get) && parseInt(eval(str_get_stat)) == sessionStorage.expire_stat){
					//$('#index_fpage').html(unescape(eval(str_get)));
				}else{
				}
					$.ajax({
						url:'/index.php/Fang/Before/index_infolist',
						type:'get',
						data:obj,
						success:function(res){
							var str_set = 'sessionStorage.Page_Index'+uri +'="'+escape(res)+'"';
							eval(str_set);
							var str_set_stat = 'sessionStorage.expire_stat'+uri + '=' + sessionStorage.expire_stat;
							eval(str_set_stat);
							$('#index_fpage').html(res);
							sess_keep();
						}
					})
			}




			//点击首页
			$('#index').click(function(){
				sessionStorage.condition_SearchText_Type=0;
				sessionStorage.condition_SearchText_Content='';
				sessionStorage.condition_SearchText_Cntent
				sessionStorage.condition_pnow=1;
				sessionStorage.condition_search_nav='';
				sessionStorage.condition_area='';
				sessionStorage.condition_class='';
				sessionStorage.condition_price='';
				index_init();
			});


			//点击发布
			$('#issue').click(function(){
				if(!sessionStorage.userInfo){
					login();
				}else{
					$.ajax({
						url:'/index.php/Fang/Before/issue',
						success:function(res){
							$('#content').html(res);
							sessionStorage.Page_Issue = escape(res);
						}
					});
				}
			});


			//点击me
			$('#me').click(function(){
				if(!sessionStorage.userInfo){
					login();
				}else{
					Get_Me();
				}
			});




		});

		//跳转到登陆界面
		function login(){
			$.ajax({
				url:'/index.php/User/User/login',
				success:function(res){
					$('#content').html(res);
					sessionStorage.Page_Login = escape(res);
				}
			});
		}
		
		//获取me页面
		function Get_Me(){
			if(sessionStorage.Me){
				$('#content').html(unescape(sessionStorage.Me));
			}else{
				$.ajax({
					url:'/index.php/Fang/Before/me',
					success:function(res){
						$('#content').html(res);
						sessionStorage.Me = escape(res);
					}
				});
			}
		}

	</script>